Skip to content

Comments

feat: scan process with wmi#20

Closed
Small-Ku wants to merge 1 commit intoSpikeHD:mainfrom
Small-Ku:feat/wmi
Closed

feat: scan process with wmi#20
Small-Ku wants to merge 1 commit intoSpikeHD:mainfrom
Small-Ku:feat/wmi

Conversation

@Small-Ku
Copy link
Contributor

@Small-Ku Small-Ku commented Oct 8, 2025

use WMI to list process, WMI seems available since XP
tested in win10, arguments are listed without admin rights

may further work on event watching with __InstanceCreationEvent and __InstanceDeletionEvent, but seems need big changes and don't bring much improvements

@SpikeHD
Copy link
Owner

SpikeHD commented Oct 8, 2025

This looks good but is there a substantial benefit over just using sysinfo? Have you tried any benchmarking or anything?

@Small-Ku
Copy link
Contributor Author

Small-Ku commented Oct 9, 2025

It just successfully get correct arguments for detecting Minecraft, while sysinfo in #15 get empty arguments before.
I didn't benchmark the performance. I tested it with the aho-corasick branch, didn't feel the performance difference.

I also did some experiments about notification with wmi instead of polling mentioned in #17, but it seems only increase the memory usage and may need more effort to optimize it.

@Small-Ku
Copy link
Contributor Author

Small-Ku commented Oct 9, 2025

Tried to benchmark with cargo bench, seems WMI worse on speed.

test server::process::test::process_list_sysinfo ... bench:  12,023,280.00 ns/iter (+/- 931,593.00)
test server::process::test::process_list_wmi     ... bench:  67,570,930.00 ns/iter (+/- 2,214,929.00)

@Small-Ku Small-Ku closed this Oct 9, 2025
@Small-Ku Small-Ku deleted the feat/wmi branch December 16, 2025 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants